#include "Instance.h"

#include <cstdlib>

CInstance::CInstance(void)
: Mod (NULL)
{
	Mod = new CModel();
}

CInstance::~CInstance(void)
{
	if (Mod != NULL)
	{
		delete Mod;
		Mod = NULL;
	}
}

void CInstance::Draw(void)
{
	if(Mod) 
		Mod->Draw();
}

void CInstance::SetColor(const float red, const float green, const float blue)
{
	Mod->SetColor(red, green, blue);
}

//Get the top left of the bounding box of the instance
Vector3D CInstance::GetTopLeft(void)
{
	return Mod->GetTopLeft();
}

//Get the bottom right of the bounding box of the instance
Vector3D CInstance::GetBottomRight(void)
{
	return Mod->GetBottomRight();
}